import { RunnableLambda } from "@langchain/core/runnables";

const fn = (text) => {
  return text.toUpperCase();
};

const runnableFn = RunnableLambda.from(fn);

const res = await runnableFn.invoke("hello");

console.log(res);
